#ifndef __SIFTWND_H__
#define __SIFTWND_H__

#include "ui/winview.h"
#include "ui/image.h"
#include "ui/text.h"
#include "uicontrol/button.h"
#include "sift/sift.h"

namespace MiniUI
{

class SIFTWnd
{
    typedef SIFTWnd this_class;
public:
    SIFTWnd();
    ~SIFTWnd();
private:
    void SetImages(Bitmap** pBitmaps, int nBitmap);

    void OnBtnCloseClick(const UIObject* sender, const Type::MiniPoint& pt, MouseButton button, uint keyState);
    void OnBtnStartComputeClick(const UIObject* sender, const Type::MiniPoint& pt, MouseButton button, uint keyState);
    void OnBtnShowOriginClick(const UIObject* sender, const Type::MiniPoint& pt, MouseButton button, uint keyState);
    void OnBtnShowInitClick(const UIObject* sender, const Type::MiniPoint& pt, MouseButton button, uint keyState);
    void OnBtnGaussianOctavesClick(const UIObject* sender, const Type::MiniPoint& pt, MouseButton button, uint keyState);
    void OnBtnDOGOctavesClick(const UIObject* sender, const Type::MiniPoint& pt, MouseButton button, uint keyState);
    void OnBtnShowKeypointsClick(const UIObject* sender, const Type::MiniPoint& pt, MouseButton button, uint keyState);
    void OnBtnShowKeyDescriptorClick(const UIObject* sender, const Type::MiniPoint& pt, MouseButton button, uint keyState);

private:
    void DrawCross(Graphics& graphics, int width, int height, int x, int y);
    void DrawArrow(Graphics& graphics, int x, int y, double ori, double len);

private:
    WinView* m_pWinView;
    Image* m_pImg;
    Image* m_pImgMask;
    View* m_pShowView;

    SIFT m_sift;
};

}

#endif